home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / msdos / raytrace / pov / gen / boxer / boxer1.bas (.txt) < prev    next >
QuickBASIC Tokenized Source  |  1993-05-01  |  27KB  |  592 lines

  1.     TileWidth{
  2.     TileHightQ
  3. RRadius
  4. XTile
  5. DTileC
  6. GroutGap
  7. FileName
  8.     TileBodyW
  9. TileBoxW
  10. TileBoxH*
  11. PRINTTileBoxW
  12. NegWh
  13. Across
  14. Rows(
  15. YTile
  16. ColumDepth
  17. TideBoxH`
  18. Column
  19. RowPosx
  20. TotalWidth
  21. TotalHight
  22. TotalHigthz
  23. HalfW
  24. HalfH
  25. FileDec
  26. TileHeight
  27. TotalHeight
  28. Chose
  29. ErrorRoutine
  30. Information
  31. Information.Screen#
  32.     InputFile
  33. Pickup
  34. ChoseA
  35. ErrorRoutine1\
  36. BoxWidth
  37.     BoxHeightt
  38. BoxDepth
  39. BoxHalfW
  40. BoxHalfH
  41. BoxHalfD
  42. BoxBoxW
  43. BoxBoxH
  44. BoxBoxD
  45.     TileDepth
  46. BoxNegW
  47. BoxNegH
  48. BoxHG
  49. BoxNegG
  50. BoxTotalWidth
  51. BoxTotalHeight
  52. BoxNegD
  53. BoxNegX
  54. BoxTileHeight
  55. BoxFrame;
  56. ArrayDepthe
  57. ArrayPositionX
  58. Array
  59. ArrayDepthTotal
  60. BoxHalf,
  61. oxBoxDD
  62. UnitBox^
  63. scale
  64. Amount
  65. Reflection
  66. AddTex3
  67. Pick2
  68. Alpha
  69. RandomPick&
  70. Ambient
  71. Diffuse
  72. Phongp
  73.     PhongSized
  74. GREENL
  75. Color1
  76. Color2
  77.     RandomTex
  78.     TexAmount
  79. incFile
  80. FileTex
  81. FilePOV
  82. FileInc
  83. CamLocation
  84. ObjectName
  85. Object1
  86. Object2
  87. Obbject1
  88.     ComObject
  89.  Boxer Maker 0.1 M.Miller 4/22/92i
  90. Choose: (A)Box Array  or  (B)Tiles "
  91.  Input for Tiles
  92. (X) Width of One Tile:                   "
  93. (Y) Height of One Tile:                  "
  94. Round Edge Radius of Tile:               "
  95. Number of Tiles across:                  "
  96. Number of Tiles down:                    "
  97. Grout Gap Between Tiles:                 "
  98. Object Name:                             "
  99. File Name:                               "
  100.  Input for Boxes
  101. (R)R_Box, (F)Frame, (B)Box, (Q)QSphere:  "
  102. (X) Width of Box:                        "
  103. (Y) Height of Box:                       "
  104. (Z) Depth of Box:                        "
  105. Round Edge Radius of Box:                "
  106. Number of Boxes across:                  "
  107. Number of Boxes down:                    "
  108. Number of Box Arrays Deep:               "
  109. Gap Between Boxes:                       "
  110. Create Random Textures for Objects (Y):  "
  111. Object Name:                             "
  112. File Name:                               "
  113. Enter either an A or a B
  114. Hit Any Key to continue or CTRL+BREAK to exit.
  115. --- Format File Namess
  116. - Format Variables for Tiles
  117. - Format Variables for Boxes
  118. * IF TILE WAS CHOSEN 
  119. --- Format Tile Inc.
  120. /*           - Tiles generated with Boxer 0.1 -"
  121.           
  122. Tiles across "
  123. Tiles down
  124.            "
  125. Total Size: X=
  126. // --- declared data needed for: "
  127. #declare S1 = quadric { Sphere scale <
  128. #declare R1 = intersection { Disk_X scale <"
  129. #declare U1 = intersection { Disk_Y scale <"
  130. #declare Tile_Texture1 =
  131. texture {"
  132.     color red .6 green .5 blue .5"
  133.     ambient .2
  134.     diffuse .6
  135.     phong 1"
  136.     phong_size 70"
  137. #declare Tile_Texture2 =
  138. texture {"
  139.     color red .3 green .5 blue .5"
  140.     ambient .2
  141.     diffuse .6
  142.     phong 1"
  143.     phong_size 70"
  144. #declare Grout_Texture =
  145. texture {"
  146.     color red .75 green .85 blue .6"
  147.     ambient .3
  148.     diffuse .6
  149.     phong .2
  150.     phong_size 10"
  151. #declare "
  152. object {
  153.   union {"
  154.     box { UnitBox scale <"
  155.     quadric { S1 translate <
  156. 0 > }"
  157.     quadric { S1 translate <
  158. 0 > }"
  159.     quadric { S1 translate <
  160. 0 > }"
  161.     quadric { S1 translate <
  162. 0 > }"
  163.     intersection { R1 translate < 0"
  164. 0 > }"
  165.     intersection { R1 translate < 0 
  166. 0 > }"
  167.     intersection { U1 translate <"
  168. 0 0 > }"
  169.     intersection { U1 translate <"
  170. 0 0 > }"
  171.         texture { Tile_Texture1 }"
  172.              bounded_by {"
  173.              box { UnitBox scale <
  174.              }
  175. #declare "
  176. object {
  177.   union {"
  178.     box { UnitBox scale <"
  179.     quadric { S1 translate <
  180. 0 > }"
  181.     quadric { S1 translate <
  182. 0 > }"
  183.     quadric { S1 translate <
  184. 0 > }"
  185.     quadric { S1 translate <
  186. 0 > }"
  187.     intersection { R1 translate < 0"
  188. 0 > }"
  189.     intersection { R1 translate < 0 
  190. 0 > }"
  191.     intersection { U1 translate <"
  192. 0 0 > }"
  193.     intersection { U1 translate <"
  194. 0 0 > }"
  195.         texture { Tile_Texture2 }"
  196.              bounded_by {"
  197.              box { UnitBox scale <
  198.              }
  199. composite {"
  200. returns (Y) of each row
  201.   composite {"
  202. returns (X) of each column
  203.     object { "
  204.  translate <
  205.     object { "
  206.  translate <
  207.          bounded_by {"
  208.          box { UnitBox scale <
  209. >  translate <
  210. 0 > }  "
  211.          }
  212.     // optional grout
  213.     object {
  214.        box { UnitBox scale <
  215. >  translate <
  216. > }  "
  217.          texture { Grout_Texture }
  218.     }"
  219.          bounded_by {"
  220.          box { UnitBox scale <
  221. >  translate <
  222. 0 > }  "
  223.          }
  224. translate <"
  225. * IF BOX WAS CHOSEN 
  226. --- Format Tile Inc.
  227. /*           - Boxes generated with Boxer 0.1 -"
  228.           
  229. Box(es) across "
  230. Box(es) down
  231. Arrays deep"
  232.            "
  233. Total Size: X=
  234. // --- declared data needed for: "
  235. #declare S1 = quadric { Sphere scale <
  236. #declare X1 = intersection { Disk_X scale <"
  237. #declare Y1 = intersection { Disk_Y scale <"
  238. #declare Z1 = intersection { Disk_Z scale <"
  239. #declare Box_Texture1 ="
  240. texture {"
  241.     color red .6 green .5 blue .5"
  242.     ambient .2
  243.     diffuse .6
  244.     phong 1"
  245.     phong_size 70"
  246. #declare Box_Texture2 ="
  247. texture {"
  248.     color red .3 green .5 blue .5"
  249.     ambient .2
  250.     diffuse .6
  251.     phong 1"
  252.     phong_size 70"
  253. #declare "
  254.  = object {"
  255.    box { UnitBox scale <
  256.         texture { Box_Texture1 }
  257. #declare "
  258.  = object {"
  259.    box { UnitBox scale <
  260.         texture { Box_Texture2 }
  261. #declare "
  262.  = object {"
  263.    quadric { Sphere scale <"
  264.         texture { Box_Texture1 }
  265. #declare "
  266.  = object {"
  267.    quadric { Sphere scale <"
  268.         texture { Box_Texture2 }
  269. #declare "
  270. object {
  271.   union {"
  272.     box { UnitBox scale <"
  273.     box { UnitBox scale <"
  274.     box { UnitBox scale <"
  275.     quadric { S1 translate <
  276.     quadric { S1 translate <
  277.     quadric { S1 translate <
  278.     quadric { S1 translate <
  279.     quadric { S1 translate <
  280.     quadric { S1 translate <
  281.     quadric { S1 translate <
  282.     quadric { S1 translate <
  283.     intersection { X1 translate < 0 
  284.     intersection { X1 translate < 0 
  285.     intersection { X1 translate < 0 
  286.     intersection { X1 translate < 0 
  287.     intersection { Y1 translate <"
  288.     intersection { Y1 translate <"
  289.     intersection { Y1 translate <"
  290.     intersection { Y1 translate <"
  291.     intersection { Z1 translate <"
  292.  0 > }
  293.     intersection { Z1 translate <"
  294.  0 > }
  295.     intersection { Z1 translate <"
  296.  0 > }
  297.     intersection { Z1 translate <"
  298.  0 > }
  299.         texture { Box_Texture1 }
  300.              bounded_by {"
  301.              box { UnitBox scale <
  302.              }
  303. #declare "
  304. object {
  305.   union {"
  306.     box { UnitBox scale <"
  307.     box { UnitBox scale <"
  308.     box { UnitBox scale <"
  309.     quadric { S1 translate <
  310.     quadric { S1 translate <
  311.     quadric { S1 translate <
  312.     quadric { S1 translate <
  313.     quadric { S1 translate <
  314.     quadric { S1 translate <
  315.     quadric { S1 translate <
  316.     quadric { S1 translate <
  317.     intersection { X1 translate < 0 
  318.     intersection { X1 translate < 0 
  319.     intersection { X1 translate < 0 
  320.     intersection { X1 translate < 0 
  321.     intersection { Y1 translate <"
  322.     intersection { Y1 translate <"
  323.     intersection { Y1 translate <"
  324.     intersection { Y1 translate <"
  325.     intersection { Z1 translate <"
  326.  0 > }
  327.     intersection { Z1 translate <"
  328.  0 > }
  329.     intersection { Z1 translate <"
  330.  0 > }
  331.     intersection { Z1 translate <"
  332.  0 > }
  333.         texture { Box_Texture2 }
  334.              bounded_by {"
  335.              box { UnitBox scale <
  336.              }
  337. composite {"
  338.  composite {
  339. returns (Y) of each row
  340.    composite {
  341. returns (X) of each column
  342.      object { 
  343.  translate <
  344.      object { 
  345.  translate <
  346.      object { 
  347.  texture { "
  348.  } translate <
  349.      object { 
  350.  texture { "
  351.  } translate <
  352.          bounded_by {"
  353.          box { UnitBox scale <
  354. >  translate <
  355. > }  "
  356.          }
  357.      }
  358.          bounded_by {"
  359.          box { UnitBox scale <
  360. >  translate <
  361. > }  "
  362.          }
  363.          bounded_by {"
  364.          box { UnitBox scale <
  365. >  translate <
  366. > }  "
  367.          }
  368. translate <"
  369.     *  Random Texture Section 
  370. - Overweigh reflection 0
  371. reflection 0.0
  372. reflection "
  373. - Overweight Alpha 0
  374. alpha 0.0"
  375. alpha 
  376. color red 
  377.  green "
  378.  blue 
  379. color red 
  380.  green "
  381.  blue 
  382. #declare "
  383.  = texture {
  384.     wood
  385.     turbulence
  386.       color_map {"
  387.       [0 .5 
  388.       
  389.       [.5 1 
  390.       
  391.       }"
  392.     ambient"
  393.     diffuse"
  394.     phong"
  395.     phong_size
  396.     scale <"
  397.     }"
  398.     color red"
  399. green"
  400.     ambient"
  401.     diffuse"
  402.     phong"
  403.     phong_size
  404.     refraction
  405.     scale <"
  406.     }"
  407.     granite"
  408.     turbulence
  409.       color_map {"
  410.       [0 .5 
  411.       
  412.       [.5 1 
  413.       
  414.       }"
  415.     ambient"
  416.     diffuse"
  417.     phong"
  418.     phong_size
  419.     scale <"
  420.     }"
  421.     color red"
  422. green"
  423.     ambient"
  424.     diffuse"
  425.     phong"
  426.     phong_size
  427.     refraction
  428.     scale <"
  429.     }"
  430.     bozo
  431.     turbulence
  432.       color_map {"
  433.       [0 .5 
  434.       
  435.       [.5 1 
  436.       
  437.       }"
  438.     ambient"
  439.     diffuse"
  440.     phong"
  441.     phong_size
  442.     scale <"
  443.     }"
  444.     color red"
  445. green"
  446.     ambient"
  447.     diffuse"
  448.     phong"
  449.     phong_size
  450.     refraction
  451.     scale <"
  452.     }"
  453.     marble
  454.     turbulence
  455.       color_map {"
  456.       [0 .5 
  457.       
  458.       [.5 1 
  459.       
  460.       }"
  461.     ambient"
  462.     diffuse"
  463.     phong"
  464.     phong_size
  465.     scale <"
  466.     }"
  467.     color red"
  468. green"
  469.     ambient"
  470.     diffuse"
  471.     phong"
  472.     phong_size
  473.     refraction
  474.     scale <"
  475.     }"
  476.     agate"
  477.     turbulence
  478.       color_map {"
  479.       [0 .5 
  480.       
  481.       [.5 1 
  482.       
  483.       }"
  484.     ambient"
  485.     diffuse"
  486.     phong"
  487.     phong_size
  488.     scale <"
  489.     }"
  490.     gradient
  491.     <0 1 0>"
  492.     turbulence; 
  493.       color_map {"
  494.       [0 .5 
  495.       
  496.       [.5 1 
  497.       
  498.       }"
  499.     ambient"
  500.     diffuse"
  501.     phong"
  502.     phong_size
  503.     scale <"
  504.     }"
  505.     color red"
  506. green"
  507.     ambient"
  508.     diffuse"
  509.     phong"
  510.     phong_size
  511.     refraction
  512.     scale <"
  513.     }"
  514.     spotted"
  515.     turbulence
  516.       color_map {"
  517.       [0 .5 
  518.       
  519.       [.5 1 
  520.       
  521.       }"
  522.     ambient"
  523.     diffuse"
  524.     phong"
  525.     phong_size
  526.     scale <"
  527.     }"
  528.     color red"
  529. green"
  530.     ambient"
  531.     diffuse"
  532.     phong"
  533.     phong_size
  534.     refraction
  535.     scale <"
  536.     }"
  537.     leopard"
  538.     turbulence
  539.       color_map {"
  540.       [0 .5 
  541.       
  542.       [.5 1 
  543.       
  544.       }"
  545.     ambient"
  546.     diffuse"
  547.     phong"
  548.     phong_size
  549.     scale <"
  550.     }"
  551.     color red"
  552. green"
  553.     ambient"
  554.     diffuse"
  555.     phong"
  556.     phong_size
  557.     refraction
  558.     scale <"
  559.     }"
  560.     onion"
  561.     turbulence
  562.       color_map {"
  563.       [0 .5 
  564.       
  565.       [.5 1 
  566.       
  567.       }"
  568.     ambient"
  569.     diffuse"
  570.     phong"
  571.     phong_size
  572.     scale <"
  573.     }"
  574. * Format POV File 
  575. --- adjust camera based on array size
  576. #include "
  577. shapes.inc
  578. #include "
  579. camera {
  580.   location <0 0 
  581.   direction <0 0 2>"
  582.   up <0 1 0>
  583.   right <1.333 0 0>"
  584.   look_at <0 0 0>"
  585. object { light_source { <-100000 100000 -100000> color red 1 green 1 blue 1 }}
  586. object { light_source { <200000 5000 -500000> color red 1 green 1 blue 1 }}"
  587. composite {"
  588.    #include 
  589.    rotate <0 30 0>
  590.    rotate <30 0 0>
  591. Boxer 0.1     -- M.Miller 4/22/92"
  592.